home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / cli / system2.arc / MANUAL < prev    next >
Text File  |  1985-11-20  |  78KB  |  2,256 lines

  1. [
  2. ?
  3.  
  4.    *******                                                     ********
  5.   ***   ***                       ***                        ***      ***
  6.   ***                             ***                                  ***
  7.    ***       ***   ***  ******  ********     ******  **********        ***
  8.     ****     ***   *** ***  ***   ***       ***  *** *** *** ***      ***
  9.        ***    ***  ***  ***       ***       ******** *** *** ***     ***
  10.         ***   *** ***     ****    ***       ***      *** *** ***    ***
  11.   ***   ***    *****   ***  ***   ***   *** ***  *** *** *** ***  ***
  12.    ******      ***      ******     ******    ******  *** *** *** ***
  13.              ***                                               ***     ***
  14. ----------****-----Operating Environment for the Atari ST-----*************--
  15.  
  16.                            Written by David Wild.
  17.  
  18.  
  19.                           U S E R ' S  M A N U A L
  20.  
  21.  
  22.                   Type HELP INDEX for a list of subjects
  23.  
  24.  
  25. ]
  26. [
  27. INDEX
  28. System 2 operating environment            User's Guide         index page 1
  29. ---------------------------------------------------------------------------
  30.  
  31.                                    INDEX
  32.                                    -----
  33.    
  34.        DETAILS                                     REFERENCED UNDER
  35.  
  36.        Introduction and details                           intro
  37.        About the author                                   author
  38.        A note on the syntax used in this manual           syntax
  39.        Starting System2                                   starting
  40.        General usage of System2                           general
  41.        Special characters                                 special
  42.        Device names                                       devices
  43.        Redirection & piping                               redirection
  44.        Macros                                             macros
  45.        Variables                                          variables 
  46.        System Variables                                   system
  47.        XSL programs                                       xsl-programs
  48.        The little things in life                          oddments
  49.        Writing programs to run under System2              technical
  50.  
  51.        Internal Commands
  52.          baud                                             baud
  53.          cat                                              cat
  54.          cd                                               cd
  55.          chmod                                            chmod
  56.          clear                                            clear
  57.          contains                                         contains
  58.          cp                                               cp
  59.          date                                             date
  60.          decr                                             decr
  61.          del                                              del
  62.          dir                                              dir
  63.          diskfree                                         diskfree
  64.          drive                                            drive
  65.          echo                                             echo
  66.          else                                             else
  67.          endif                                            endif
  68.          equal                                            equal
  69.          exists                                           exists
  70.          exit                                             exit
  71.          false                                            false
  72.          getc                                             getc
  73.          goto                                             goto
  74.          if                                               if
  75.          incr                                             incr
  76.          input                                            input
  77.          istrue                                           istrue
  78.          locate                                           locate
  79.          ls                                               ls
  80.          mcat                                             mcat
  81.          mkdir                                            mkdir
  82.          mkill                                            mkill
  83.          mv                                               mv
  84.          notequal                                         notequal
  85.          path                                             path
  86.          pr                                               pr
  87.          putc                                             putc
  88. ]
  89. [
  90. INDEX
  91. System 2 operating environment            User's Guide         index page 2
  92. ---------------------------------------------------------------------------
  93.  
  94.                                    INDEX
  95.                                    -----
  96.    
  97.        DETAILS                                     REFERENCED UNDER
  98.  
  99.          pwd                                              pwd
  100.          quit                                             quit
  101.          ren                                              ren
  102.          result                                           result
  103.          rm                                               rm
  104.          rmdir                                            rmdir
  105.          set                                              set
  106.          time                                             time
  107.          true                                             true
  108.          type                                             type
  109.          unset                                            unset
  110.          xsl                                              xsl
  111.          .                                                .
  112.          $                                                $
  113.          *                                                *
  114.  
  115.        External commands
  116.          help                                             help
  117.          bombs                                            bombs
  118.          tl50                                             tl50
  119.          tl25                                             tl25
  120.  
  121.        Glossary                                           glossary
  122.  
  123.          
  124. ]
  125. [
  126. INTRO
  127. System 2 operating environment            User's Guide         Introduction
  128. ---------------------------------------------------------------------------
  129.  
  130.  
  131.                          INTRODUCTION AND DETAILS
  132.                          ------------------------
  133.  
  134.  
  135. System 2 is an operating system shell for the Atari ST computer. It should
  136. work without problem on all versions of the computer and TOS.
  137.  
  138. What is an operating system shell (a.k.a Command Line Interpreter)?
  139.  
  140. An OS shell, like System2, provides a different method of giving commands
  141. to the computer. The usual way of controlling things on the ST is via the
  142. GEM desktop, where you drag files around, etc. with the mouse. This is all
  143. good stuff, but there are many instances when it can be restrictive, such
  144. as in copying & deleting files, formatting text, running TOS programs, etc.
  145. This is where System2 comes into it's own. It allows commands to be typed
  146. in, instead of using a graphical front end, and is in many ways similar to
  147. Unix*. Here are some of it's features:
  148.  
  149.   o  Unix Style command entry
  150.   o  Full input/output redirection & piping
  151.   o  Around 50 built-in commands
  152.   o  Ability to quickly recall the last 10 commands typed
  153.   o  Only takes up around 45K of memory
  154.   o  Aliasing and variables
  155.   o  Mini programming language with IFs and GOTOs
  156.   o  Built in expression evaluator
  157.  
  158. System2 was written using Mark Williams C and assembler by:
  159.  
  160.                     David Wild
  161.                     62 Lascelles Avenue
  162.                     Withernsea
  163.                     North Humberside
  164.                     HU19 2EB
  165.                     England
  166.  
  167.                     JANET EMAIL : WILDDJ@UK.AC.ASTON.VAXB
  168.  
  169.  
  170.  
  171.  
  172.  
  173. ----------------------------------------------------------------------------
  174. * UNIX is a registered trademark of AT&T Bell Laboratories
  175. ]
  176. [
  177. AUTHOR
  178. System 2 operating environment   User's Guide              About the author
  179. ---------------------------------------------------------------------------
  180.  
  181.                              About the author
  182.                              ================
  183.  
  184.  
  185. Hello! I'm David Wild, the author of System2, and I just thought I'd say
  186. a bit about myself. I'm 19, and am currently doing a computer science
  187. degree at Aston University in Birmingham. The idea for writing System2
  188. came from an interest in Unix, so many of the commands have a similar
  189. "Look and feel" to them (Oh dear, I shouldn't have said that. What's
  190. betting I have 100 lawsuits from AT&T through the door in a few weeks
  191. time!!). System2 isn't anywhere near as powerful as Unix (TM (R) (C) etc..)
  192. but it is hopefully a useful program.
  193.  
  194. If you have any suggestions, queries, complaints, etc., please write to me
  195. at:
  196.  
  197.                         62 Lascelles Avenue
  198.                         Withernsea
  199.                         North Humberside
  200.                         HU19 2EB
  201.  
  202. Or send JANET EMail to
  203.  
  204.                         WILDDJ@UK.AC.ASTON.VAXB 
  205.  
  206. ]
  207. [
  208. SYNTAX
  209. System 2 operating environment            User's Guide               syntax
  210. ---------------------------------------------------------------------------
  211.  
  212.  
  213.                         SYNTAX USED IN THE MANUAL
  214.                         -------------------------
  215.  
  216. The following syntax conventions are used in this manual when describing
  217. commands:
  218.  
  219. o Items of text written directly should be typed in directly
  220. o Text enclosed in < and > signifies where you should supply some
  221.   information, eg a filename
  222. o Items in square brackets, ie [ and ], are optional
  223. o Items separated by a bar (|) mean you can enter ONE of the separated
  224.   items
  225. o An ellipsis (...) means that the last item can be repeated several times
  226.  
  227. Do not confuse the < and > above with the redirection operators, or
  228. the | sign with the piping operator.
  229.  
  230. Example:
  231.  
  232.                      cat [<filespec> ... ]
  233.                      
  234.                       ^        ^      ^
  235.                      type  supplied  may be
  236.                   directly   value   repeated
  237.  
  238.                          \______  ______/
  239.                                 \/
  240.                              optional
  241.  
  242. ]
  243. [
  244. STARTING
  245. System 2 operating environment   User's Guide                      starting
  246. ---------------------------------------------------------------------------
  247.  
  248.                             STARTING UP SYSTEM2
  249.                             -------------------
  250.  
  251. To start up System2, insert the disk and double click on the SYSTEM2.TOS
  252. icon. System2 will only work in medium or high resolution.
  253. ]
  254. [
  255. GENERAL
  256. System 2 operating environment   User's Guide                 general usage
  257. ---------------------------------------------------------------------------
  258.  
  259.  
  260.                          GENERAL USAGE OF SYSTEM2
  261.                          ------------------------
  262.  
  263. When you first load up System2, an introductory message will appear, and a
  264. prompt (a $ sign) will appear, which means that the computer is telling you
  265. it's waiting for you to type something (the prompt can be changed with the
  266. set command). At this prompt, you can type in a command line. A command
  267. line takes the following form:
  268.  
  269.      command [<qualifiers>] [<parameters>] [< <input>] [> <output>]
  270.  
  271. After a command line is typed, the RETURN key is pressed in order to
  272. carry out a command.
  273.  
  274. The command is the name of the command which you want to carry out, which
  275. can be either the name of an in-built command (see the internal commands
  276. section of the manual), or the name of an external command (ie a program
  277. on a disk that you wish to run. The following are examples of valid
  278. commands:
  279.  
  280.                          cat
  281.                          dir
  282.                          a:\bin\test
  283.                          utils\abc
  284.  
  285. External commands are assumed to have the filename extension .tos, .ttp
  286. or .prg. Note that GEM programs (ie that use the mouse) cannot be run
  287. under System2.
  288.  
  289. The parameters are values that are supplied to a command, such as
  290. filenames and data. The qualifiers are only used in some commands, and
  291. are a special type of parameter: they start with a '-' and consist of a 
  292. set of letters which dictate the ways in which the commands work.
  293. For example, in the dir command,
  294.  
  295.                          dir -w *.c
  296.  
  297. the w qualifier sets the dir command to work in wide mode.
  298.  
  299. The <input and >output parts define any redirection that may take place,
  300. and are discussed in the section on redirection & piping.
  301.  
  302. More than one command line can be placed on one line. Command lines are
  303. separated by a ; or a | character. A ; allows several commands to be
  304. entered on one line as if they had been typed consecutively on several
  305. lines, for example
  306.  
  307.                         dir -w ; cat
  308.  
  309. is the same as typing
  310.  
  311.                         dir -w
  312.                         cat
  313.  
  314.  
  315.  
  316.  
  317.  
  318. ]
  319. [
  320. GENERAL
  321. System 2 operating environment   User's Guide          general usage page 2
  322. ---------------------------------------------------------------------------
  323.  
  324. If the | (pipe) character is used, then the output of one command is
  325. fed into the next. See the section on redirection & piping for more
  326. details.
  327.  
  328. A few control keys will work whilst typing, which allows simple editing.
  329. Pressing BACKSPACE deletes the last character entered. Pressing
  330. CONTROL and A restores deleted characters one by one, and CONTROL R
  331. will move back through the last 10 command lines typed, allowing you
  332. to repeat commands. For example, if you had typed "cobmands" instead
  333. of "commands", you could press BACKSPACE 6 times, type "m", then press
  334. CONTROL A five times, to restore the other deleted characters.
  335.  
  336. By default, all characters on the line are converted to upper case, and
  337. items of text cannot contain spaces (as these would be interpreted as
  338. separating parameters, etc). To remedy this, items may be placed in quotes
  339. (either double or single) which allows spaces, and text in quotes is not
  340. put into upper case. Also, items in quotes will not be treated as
  341. potential variables or be subject to macro substitution (see section on
  342. macros & variables). For example, the echo command displays it's parameters
  343. on the screen, so
  344.  
  345.                       echo hello
  346.  
  347. would display HELLO on the screen. However,
  348.  
  349.                       echo "hello"
  350. or                    echo 'hello'
  351.  
  352. would display
  353.  
  354.                       hello
  355. on the screen.
  356.  
  357. If you wish to include a quote character within quotes, use the opposite
  358. type of quotes for the text. For example,
  359.  
  360.                       echo "This is 'some' text"
  361. displays              This is 'some' text
  362.  
  363. and                   echo 'This is "some" text'
  364. displays              This is "some" text
  365.  
  366. A command line may only be 80 characters long. Unpredictable results may
  367. occur with lines longer than this.
  368. ]
  369. [
  370. SPECIAL
  371. System 2 operating environment   User's Guide            special characters
  372. ---------------------------------------------------------------------------
  373.  
  374.  
  375.                   SPECIAL CHARACTERS & CONTROL CHARACTERS
  376.                   ---------------------------------------
  377.  
  378.     CHARACTER                        USE
  379.  
  380.      " or '           For enclosing literal text
  381.  
  382.        ;              Separates commands on a line
  383.  
  384.        |              Pipes commands together
  385.  
  386.        <              Allows input redirection
  387.  
  388.        >              Allows output redirection
  389.  
  390.        %              Starts a variable name
  391.  
  392.  
  393.  
  394.     BACKSPACE         Deletes last character entered
  395.  
  396.     CONTROL A         Undelete character
  397.  
  398.     CONTROL R         Recall command line
  399.  
  400. ]
  401. [
  402. DEVICES
  403. System 2 operating environment   User's Guide                       devices
  404. ---------------------------------------------------------------------------
  405.  
  406.  
  407.                                 DEVICES
  408.                                 -------
  409.  
  410. When using System2, there are three reserved filenames which correspond
  411. to actual physical devices - the screen, the RS232 port and the printer.
  412. The device names may be used in place of file names, and allow the
  413. devices to be treated as files. The devices are:
  414.  
  415.  
  416.     CON:                    Refers to screen for output
  417.                             & keyboard for input
  418.  
  419.     AUX:                    Refers to a device connected to the RS232 port
  420.  
  421.  
  422.     PRN:                    Refers to the printer for output.
  423.                             Inputting from this device is not possible.
  424.  
  425.  
  426. These devices are especially useful in redirection, for example,
  427.  
  428.                       echo "Hello" > prn:
  429.  
  430. prints "Hello" on the printer. By default, input and output is to the
  431. CON: device.
  432. ]
  433. [
  434. REDIRECTION
  435. System 2 operating environment   User's Guide          redirection & piping
  436. ---------------------------------------------------------------------------
  437.  
  438.  
  439.                            REDIRECTION AND PIPING
  440.                            ----------------------
  441.  
  442. Most commands allow data to output to a theoretical device called the
  443. standard output (stdout) and input from a theoretical standard input
  444. (stdin). By default, the stdin and stdout are mapped to the CON: device
  445. (see section on devices), corresponding to keyboard for input and the
  446. screen for output, but these can be changed. This is known as redirection.
  447.  
  448. A device can be permanently set for stdin or stdout by using the set
  449. command. For example, after typing
  450.  
  451.                       set stdin=AUX:
  452.  
  453. all input will be taken from a device, such as a terminal, connected to the
  454. RS232 port. Correspondingly,
  455.  
  456.                       set stdout=PRN:
  457.  
  458. will send all output to the printer instead of the screen. Issuing a
  459.  
  460.                       set stdout=CON:
  461.  
  462. command will return back to normal screen output.
  463.  
  464. There is another method of redirection, which allows  a single command
  465. to output to either a device or a disk file, and input from either a
  466. device or disk file. It is carried out using the '<' and '>' symbols;
  467. '<' stands for input redirection and '>' for output redirection. These
  468. symbols, if given, should come after the command and it's parameters. The
  469. symbols are followed by either the name of a disk file, or the name of
  470. a device (CON:, AUX:, or PRN:). For example,
  471.  
  472.                       echo "Hello" > prn:
  473.  
  474. prints "Hello" on the printer
  475.  
  476.                       cat > fred.doc
  477.  
  478. Takes input from the keyboard, & puts it into file fred.doc
  479.  
  480.                       cat <bill.doc >fred.doc
  481.    
  482. Takes input from the file bill.doc and puts it into fred.doc (effectively
  483. copying file bill.doc to file fred.doc.
  484.  
  485. System2 is not fussy about whether spaces are present or not between the
  486. command and the '<' or '>' symbol, or between the symbol and the filename.
  487.  
  488. There is a special kind of output redirection to a file: if two '>' symbols
  489. are placed together, then output will be added to the end of an existing
  490. file, instead of a new file being created. For example,
  491.  
  492.                       cat bill.doc >> fred.doc
  493.  
  494. will append file bill.doc onto the end of file fred.doc.
  495.  
  496.  
  497.  
  498.  
  499. ]
  500. [
  501. REDIRECTION
  502. System 2 operating environment   User's Guide   redirection & piping page 2
  503. ---------------------------------------------------------------------------
  504.  
  505.  
  506. There is yet another kind of redirection - piping. Piping allows the
  507. output of one command to be taken as the input of another. The
  508. commands are separated by the '|' (bar) symbol. For example,
  509.  
  510.                       dir | pr -i10
  511.  
  512. will display a disk directory with a left margin of 10 spaces - the output
  513. of dir (a directory listing) is fed in as the input to the pr command
  514. which, in this case, displays it on the screen with a left margin.
  515. Piping & redirection can be mixed, so
  516.  
  517.                       dir | pr -i10 > neatdir.doc
  518.  
  519. would do the same as above, but it sends the output to a file called 
  520. neatdir.doc. Pipes can be used together, for example, if you had a disk
  521. program called uniq.ttp which removed identical lines from a file, then
  522. you could type
  523.  
  524.                       dir | uniq | pr -i10 > neatdir.doc
  525.  
  526. You cannot both redirect and pipe the output of a command - for instance,
  527.  
  528.                       dir > fred.doc | pr
  529.  
  530. is not valid.
  531.  
  532. The pipe has to create a temporary file while in use, which is deleted when
  533. no longer needed (named PIPE.TMP). The place where this is created can be
  534. set by setting the TMPPATH system variable.
  535.  
  536. Another theoretical device, stderr, exists within System2, which determines
  537. where error messages are sent. For example
  538.  
  539.                       set stderr=AUX:
  540.  
  541. sends all System2 error messages to the AUX: device. Note that this may
  542. not work with external TOS programs, since stderr is not normally defined
  543. on the ST.
  544.  
  545. Also look at - set, system variables
  546. ]
  547. [
  548. MACROS
  549. System 2 operating environment   User's Guide                        macros
  550. ---------------------------------------------------------------------------
  551.  
  552.  
  553.                                    MACROS
  554.                                    ------
  555.  
  556. Suppose you wanted the dir command to split it's output into pages of
  557. length 20 lines with 2 lines between pages. You can do this by typing
  558.  
  559.                       dir | pr -l20s2
  560.  
  561. but it is tedious typing this every time. However if you type in
  562.  
  563.                       set neatdir:"dir | pr -l20s2"
  564.  
  565. then every time you type in neatdir, you will get a split listing - try
  566. it! The name 'neatdir' is called a macro.
  567. Once a macro has been set as above, then EVERY occurrence of this string
  568. on the command line (except text in quotes) is replaced by the supplied
  569. string. For example, after typing
  570.  
  571.                       set much:"a load of"
  572.  
  573. then
  574.  
  575.                       echo "This is "much" rubbish"
  576.  
  577. would display         This is a load of rubbish
  578.  
  579. and                   echo thismuchrubbish
  580.  
  581. would display         THISALOADOFRUBBISH
  582.  
  583. Care should be taken - if you defined a macro, for example,
  584.  
  585.                       set in:"set stdin=aux:"
  586.  
  587. then typing
  588.  
  589.                       echo i-think-we-made-a-mess
  590.  
  591. would display         I-THSETSTDIN=AUX:K-WE-MADE-A-MESS
  592.  
  593. Macros can be unset by the mkill command or by using unset. Note that the
  594. macro name should be placed in quotes, eg
  595.  
  596.                       unset "much"
  597.  
  598. or else the name of the macro to be unset will be taken as the VALUE of
  599. much!
  600.  
  601. Commands to look at - set, unset, mkill, incr, decr, eval, echo
  602. ]
  603. [
  604. VARIABLES
  605. System 2 operating environment   User's Guide                     variables
  606. ---------------------------------------------------------------------------
  607.  
  608.  
  609.                                  VARIABLES
  610.                                  ---------
  611.  
  612. Variables are a special type of macro, and in most instances, a macro can
  613. be used in place of a variable. Variables are set up in exactly the same
  614. way as a macro, but they are distinguished from macros by putting a % sign
  615. at the start of the name, for example,
  616.  
  617.                       set %age=19
  618.  
  619. The main differences from macros are:
  620.  
  621.   o  In the input, unset, incr, etc. commands, the name of the variable
  622.      does not need to be put in quotes, eg incr %age instead of incr "age"
  623.  
  624.   o  Substitution of the value only occurs if the variable is given on
  625.      its own as a parameter, eg
  626.  
  627.                       set age="fred"
  628.                       echo 123age456
  629.  
  630.      displays         123fred456
  631.  
  632.      but              set %age="fred"
  633.                       echo 123%age456
  634.  
  635.      displays         123%age456
  636.  
  637.   
  638. Variables' values can be easily changed with the set, incr and decr
  639. commands. See the relevant sections for details.
  640. ]
  641. [
  642. SYSTEM
  643. System 2 operating environment   User's Guide              system variables
  644. ---------------------------------------------------------------------------
  645.  
  646.  
  647.                              SYSTEM VARIABLES
  648.                              ----------------
  649.  
  650. There are several variables which are already defined in System2. These
  651. can be split into two types - ones which can be set with the Set command,
  652. and ones which cannot. If system variables are being set with the set
  653. command, then the % sign is not entered - eg to set the %stderr system
  654. variable to AUX:, you would enter
  655.  
  656.                  set stderr=aux:
  657.  
  658. but you would still type
  659.  
  660.                  echo %stderr
  661.  
  662.  
  663. System variables which can be set:
  664. ----------------------------------
  665.  
  666. NAME            POSSIBLE VALUES     DESCRIPTION
  667.  
  668. %colour             0-3             Sets colour pen used for text output
  669.  
  670. %echo              ON or OFF        Determines whether text input is
  671.                                     echoed on the standard output (useful
  672.                                     for entering passwords and on echoing
  673.                                     terminals
  674. %lf                ON or OFF        Sets if linefeeds contain LF character
  675.  
  676. %paper              0-3             Sets colour pen used for background
  677.  
  678. %prompt           any string        Contains system prompt
  679.  
  680. %stderr          CON: AUX: or PRN:  Standard error device
  681.  
  682. %stdin           CON: AUX: or PRN:  Standard input device
  683.  
  684. %stdout          CON: AUX: or PRN:  Standard output device
  685.  
  686. %syscol             0-3             Colour pen used for text input
  687.  
  688. %tmppath          pathname          place where temporary pipe files are
  689.                                     stored
  690.  
  691. System variables which can't be set:
  692. ------------------------------------
  693.  
  694. %result          Contains returned result of last command
  695.  
  696. screenres       Contains screen resolution - 0=low, 1=medium, 2=high
  697. ]
  698. [
  699. XSL-PROGRAMS
  700. System 2 operating environment   User's Guide                  xsl-programs
  701. ---------------------------------------------------------------------------
  702.  
  703.  
  704.                                XSL PROGRAMS
  705.                                ------------
  706.  
  707. System2 has a batch programming facility known as XSL (eXternal Script
  708. Language). This allows System2 commands to be placed in sequence in a file,
  709. and this file is read in using the xsl command, and the commands are
  710. executed as if they had been typed into System2. Simple programming
  711. constructs are catered for, namely IF and GOTO.
  712.  
  713. Files containing XSL programs should have the extension .XSL. Some sample
  714. XSL files are provided in the directory SAMPLE.XSL. XSL programs can be
  715. created with any text editor, such as the micro emacs editor.
  716.  
  717. XSL programs can be passed parameters like programs. These paramaters are
  718. assigned to variables %1, %2, ... etc up to %9. So if an XSL program
  719. was run as follows (assuming it was called fred.xsl):
  720.  
  721.                     XSL fred hello there
  722.  
  723. then %1 would equal HELLO and %2 would equal THERE. Another variable,
  724. %argc, contains the number of parameters supplied.
  725.  
  726. If a file PROFILE.XSL exists in the same directory as System2, then when
  727. System2 is executed, this XSL program is read in and executed.
  728.  
  729. See also: xsl, if, goto
  730. ]
  731. [
  732. ODDMENTS
  733. System 2 operating environment   User's Guide                      oddments
  734. ---------------------------------------------------------------------------
  735.  
  736.  
  737.                        The Little things in life...
  738.                        ----------------------------
  739.  
  740. Here are some handy uses of System2 which may not be immediately obvious...
  741.  
  742. Printing out files
  743. ------------------
  744. Often, you want to print a file on the printer to put into a binder, say.
  745. Unfortunately, the GEM printing function does not have any formatting
  746. capabilities. Using the pr command, you can set the left hand margin, and
  747. split the file into neat pages for printing.
  748.  
  749. Sending control codes to the printer
  750. ------------------------------------
  751. If you wish to set your printer to a certain print mode, then this can
  752. easily be done using the putc command.
  753.  
  754. Copying files
  755. -------------
  756. The cp and cat commands are much more powerful than the GEM equivalents
  757.  
  758. Putting control codes at the start or end of files
  759. --------------------------------------------------
  760. To do this, use the putc command to create a file with the control codes
  761. in, and use the cat command to join the files, or use the appending
  762. redirection (>>).
  763. ~
  764. System 2 operating environment   User's Guide                     technical
  765. ---------------------------------------------------------------------------
  766.  
  767.  
  768.                    Writing programs to run under System2
  769.                    -------------------------------------
  770.  
  771. When System2 loads up an external program, it passes to it a command line
  772. containing the parameters, and also an environment string which contains:
  773.  
  774. (i) The name of a file used for input redirection, or a space if non exists
  775.  
  776. (ii) A space
  777.  
  778. (iii) The name of the current stderr device (CON:, AUX:, or PRN:)
  779.  
  780.  
  781. These can be used in C by the following main construct:
  782.  
  783.     main(argc,argv,envp) int argc; char *argv[]; char *envp[];
  784.     {
  785.       /* your program */
  786.     }
  787.  
  788. argc contains the number of parameters, argv[1]..argv[argc] contains
  789. the parameters, and envp[0] contains the environment string.
  790. ]
  791. [
  792. BAUD
  793. System 2 operating environment   User's Guide - Internal Commands      baud
  794. ---------------------------------------------------------------------------
  795.  
  796. Command          baud
  797. Syntax           baud <rate>
  798.  
  799. The baud command allows the baud rate for the RS232 port (referenced as
  800. AUX: under System2) to be set. The <rate> parameter refers to the baud
  801. rate, and can be one of the following values: 19200,9600,4800,3600,2400,
  802. 2000,1800,1200,600,300,200,150,134,110,75,50. The default baud rate on
  803. the ST is 9600 baud.
  804.  
  805. Examples:
  806.                  baud 9600
  807.                  baud 75
  808. ~
  809. System 2 operating environment   User's Guide - Internal Commands       cat
  810. ---------------------------------------------------------------------------
  811.  
  812. Command          cat
  813. Syntax           cat [<filespec> ... ]
  814.  
  815. The primary function of the cat command is to join files together
  816. (concatenation, hence the command name cat). However, it serves many
  817. other purposes.
  818. The cat command can be supplied with one or more parameters, each of which
  819. can be a filename or a file specification containing wildcards. All
  820. files which match the file specifications are joined together, and the
  821. result is sent to standard output. If no parameters are supplied, then
  822. input is taken from the standard input.
  823. cat is very useful for use with redirection, as shown in the examples
  824. below:
  825.  
  826. Examples:
  827.  
  828.   cat > fred.doc              Copies input from the keyboard to fred.doc
  829.   cat fred.doc                Displays the file fred.doc on the screen
  830.   cat fred.doc bill.doc       Displays fred.doc and bill.doc
  831.   cat fred.doc > bill.doc     Copies file fred.doc to file bill.doc
  832.   cat a*.* b*.*               Displays all files starting with a or b
  833.   cat *.c fred.doc            Displays all files ending in .c, followed
  834.                                 by fred.doc
  835.   cat ch1.wp ch2.wp > book.wp Makes a new file book.wp containing ch1.wp
  836.                                 and ch2.wp joined together.
  837.   cat ch3.wp >>book.wp        Adds ch3.wp on to the end of book.wp
  838.   cat fred.doc > prn:         Sends file fred.doc to the printer
  839.   cat < fred.doc              Displays the file fred.doc on the screen
  840.   cat <aux: >prn:             Takes input from a console connected to the
  841.                               RS232 port, and sends it to the printer.
  842.  
  843. Notes:
  844.  
  845. If input is taken from the keyboard and redirected to another output, as
  846. in the first example above, the typed information will still be displayed
  847. on the screen to allow for verification.
  848.  
  849. If input is taken from the keyboard, or a redirected input, then as soon
  850. as a CONTROL Z character is encountered (character 27), then input is
  851. terminated. So, in the first example above, you would type the information
  852. that you wished to be in the file fred.doc, then hold down the CONTROL key
  853. and press Z to end the input. CONTROL Z's in unredirected files are treated
  854. as any other character.
  855.  
  856. Pressing CONTROL S and CONTROL Q during displaying a file on the screen will
  857. cause the screen to freeze and be released, enabling text to be viewed
  858. before it scrolls off the screen. Do not press CONTROL C during output, or
  859. else you may be aborted to the desktop.
  860.  
  861. Note that pressing return while typing into a file using cat will only
  862. result in a carriage return being sent (sending the cursor to the left
  863. of the screen). To send a line feed (go to next line), press CONTROL J.
  864.  
  865. See also: type, cp, echo
  866. ]
  867. [
  868. CD
  869. System 2 operating environment   User's Guide - Internal Commands        cd
  870. ---------------------------------------------------------------------------
  871.  
  872. Command          cd
  873. Syntax           cd <path>
  874.  
  875. This command changes the current directory to the given path. All further
  876. commands (eg ls) will now operate on files in this directory. It is similar
  877. to double clicking on a folder from GEM.
  878.  
  879. To return to the root directory (the default, top level directory that
  880. contains all other directories and files), enter
  881.  
  882.                  cd \
  883.  
  884. Examples:
  885.                  cd \bin
  886.                  cd database\customer
  887.  
  888. See also: mkdir, rmdir, pwd, drive
  889.  
  890. ]
  891. [
  892. CHMOD
  893. System 2 operating environment   User's Guide - Internal Commands     chmod
  894. ---------------------------------------------------------------------------
  895.  
  896. Command          chmod
  897. Syntax           chmod <hrw> file
  898.  
  899. The chmod command allows the read/write and visibility status of a file
  900. to be altered. The first parameter consists of three flags, each of
  901. which can be the character shown above, or a dash ('-'). If the character
  902. is supplied, then the status corresponding to that character is set to on,
  903. otherwise it is set to off. h stands for hidden (ie not shown on the
  904. desktop), r for read access, and w for write access.
  905.  
  906. Examples:
  907.   chmod -rw fred.doc            Sets fred.doc to be visible, readable,
  908.                                 and writable
  909.   chmod hrw fred.doc            Sets fred.doc to be hidden, readable, and
  910.                                 writable
  911.   chmod -r- fred.doc            Sets fred.doc to be visible and read only
  912.   chmod hr- fred.doc            Sets fred.doc to be hidden and read only
  913.  
  914. Notes:
  915.  
  916. If a file is set to read only (ie r- as opposed to rw) then it cannot be
  917. altered or erased unless it's status is set back to rw. All files must
  918. be readable, so the r flag is compulsory, and only included for
  919. familiarity with Unix users. Any other characters apart from h, r & w
  920. in their appropriate positions are treated as being equivalent to a dash.
  921. ]
  922. [
  923. CLEAR
  924. System 2 operating environment   User's Guide - Internal Commands     clear
  925. ---------------------------------------------------------------------------
  926.  
  927. Command          clear
  928. Syntax           clear
  929.  
  930. The clear command clears the screen, and sets the cursor position to the
  931. upper left hand corner of the screen.
  932.  
  933. Example:
  934.                  clear
  935.  
  936. See also: locate
  937. ]
  938. [
  939. COMMANDS
  940. System 2 operating environment   User's Guide - Internal Commands  commands
  941. ---------------------------------------------------------------------------
  942.  
  943. Command          commands
  944. Syntax           commands
  945.  
  946. This commands produces a list of all the built-in System2 commands.
  947.  
  948. Example:
  949.  
  950.                  commands
  951.  
  952. Notes:
  953.  
  954. The list does not include the commands command!
  955. ]
  956. [
  957. CONTAINS
  958. System 2 operating environment   User's Guide - Internal Commands  contains
  959. ---------------------------------------------------------------------------
  960.  
  961. Command          contains
  962. Syntax           contains <string1> <string2>
  963.  
  964. The contains command returns a value of true (0) if <string2> is contained
  965. in <string1>, or false (-1) if it isn't. It is intended for use with the if
  966. command, for example,
  967.  
  968.          if contains %birdname "gull" ; echo "Seabird" ; echo ; endif
  969.  
  970. would print 'Seabird' on the screen if the variable %birdname contains
  971. the string 'gull'. All tests are case sensitive.
  972.  
  973. Examples:
  974.  
  975.   contains "this is some text" "some"             returns 0
  976.   contains "this is some text" "SOME"             returns -1
  977.   contains "this is some text" some               returns -1
  978.   contains "this is SOME text" some               returns 0
  979.   contains thisissometext some                    returns 0
  980.  
  981. Notes:
  982.  
  983. All tests are case sensitive, so "FRED" will not match 'Fred','fred', etc.
  984.  
  985. See also: equal, notequal, istrue
  986. ]
  987. [
  988. CP
  989. System 2 operating environment   User's Guide - Internal Commands        cp
  990. ---------------------------------------------------------------------------
  991.  
  992. Command          cp
  993. Syntax           cp <filespec> <destfilespec>
  994.  
  995. The cp command is used to copy files from one place to another (akin to
  996. dragging files using the GEM desktop, only more powerful). The <filespec>
  997. parameter describes the source file(s), and can contain wildcards. The
  998. <destfilespec> parameter either specifies the path to which the files are
  999. to be copied, or supplies the path/file name of a single file. Except in
  1000. the latter case, files will be given the same names as the files that
  1001. are being copied.
  1002.  
  1003. Examples:
  1004.                  cp a:*.c b:\source
  1005.                  cp *.c source
  1006.                  cp fred.dat b:
  1007.                  cp fred.dat b:john.dat
  1008.                  cp a:\source\*.c d:\src
  1009.  
  1010. Notes:
  1011.  
  1012. Copying multiple files to one destination file (eg cp *.c b:fred.dat) is
  1013. allowed, but will result in only the last file being copied. If you wish
  1014. to create a composite file, use the cat command.
  1015.  
  1016. See also: cat, type
  1017. ]
  1018. [
  1019. DATE
  1020. System 2 operating environment   User's Guide - Internal Commands      date
  1021. ---------------------------------------------------------------------------
  1022.  
  1023. Command          date
  1024. Syntax           date [<dd> <mm> <yyyy>]
  1025.  
  1026. The date command will display the current date, or will allow the date to
  1027. be set if the three parameters (corresponding to day, month, year) are
  1028. supplied. The month is in numeric format (1-12) and the year is in four
  1029. digit format (1980-2099).
  1030.  
  1031. Examples:
  1032.                  date
  1033.                  date 2 4 1989
  1034.                  date 14 8 1985
  1035.  
  1036. Notes:
  1037.  
  1038. Validity checking is carried out on the dates, but this does not extend to
  1039. preventing the date being set to 30 February, 31 September, etc. 
  1040.  
  1041. See also: time
  1042. ]
  1043. [
  1044. DECR
  1045. System 2 operating environment   User's Guide - Internal Commands      decr
  1046. ---------------------------------------------------------------------------
  1047.  
  1048. Command          decr
  1049. Syntax           decr <variable>
  1050.  
  1051. The decr command will subtract 1 from the value held in a variable.
  1052.  
  1053. Examples:
  1054.                  decr %count
  1055.                  decr %value
  1056.  
  1057. decr is very useful if used in a loop in an xsl program. For example, the
  1058. xsl program:
  1059.  
  1060.                  set %count=10
  1061.                  . loop
  1062.                  echo "Hello"
  1063.                  echo
  1064.                  decr %count
  1065.                  if istrue %count}0 ; goto loop ; endif
  1066.                  exit
  1067.  
  1068. will display "Hello" 10 times
  1069.  
  1070. Notes:
  1071.  
  1072. All arithmetic is in two byte integer form; decrementing below -32768 will
  1073. cause spurious results.
  1074. This command is equivalent to a two byte form of
  1075.                  set <variable>=<variable>-1
  1076.  
  1077. See also: incr, set, xsl
  1078. ]
  1079. [
  1080. DEL
  1081. System 2 operating environment   User's Guide - Internal Commands       del
  1082. ---------------------------------------------------------------------------
  1083.  
  1084. Command          del
  1085. Syntax           del <filespec>
  1086.  
  1087. This command is used to remove disk files that are no longer needed. A
  1088. removed file CANNOT BE RECOVERED.
  1089.  
  1090. The filespec parameter can be a single filename, in which case the given
  1091. file is deleted, or a wildcard, in which case all files that match the
  1092. specification are deleted.
  1093.  
  1094. Obviously, this command must be used with great care. If you wish, the
  1095. command RM can be used in place of DEL.
  1096.  
  1097. Examples:
  1098.                  del fred.doc
  1099.                  del *.c
  1100.  
  1101. See also: rm, rmdir
  1102. ]
  1103. [
  1104. DIR
  1105. System 2 operating environment   User's Guide - Internal Commands       dir
  1106. ---------------------------------------------------------------------------
  1107.  
  1108. Command          dir
  1109. Syntax           dir [-[aw]] [<filespec>]
  1110.  
  1111. This command displays a list of all the files that are stored on a disk.
  1112. It is basically the same as the ls command, except that it produces an
  1113. MS-DOS(tm) style directory.
  1114.  
  1115. If the -w (wide) qualifier is specified, only the names of the files or
  1116. directories that match the filespec are output, and no distinction is made
  1117. between subdirectories and files. If the -w qualifier is not given, then the
  1118. output is of the form:
  1119.  
  1120.         <name> <file size> <date & time of creation> <file status>
  1121.  
  1122. The file status is given as a decimal number. This is the standard ST
  1123. attribute byte.
  1124.  
  1125. If the -a qualifier is specified, then all files that match the filespec
  1126. are shown, including system files that are normally hidden from the directory
  1127. list.
  1128.  
  1129. After the file list, the number of files matching the specification is shown
  1130. together with the number of bytes consumed by these files.
  1131.  
  1132. The optional filespec parameter can be (i) a filename with wildcards,
  1133. (ii) a disk drive letter followed by a colon, or (iii) a combination of
  1134. disk drive letter and filename.
  1135.  
  1136. Examples:
  1137.                 dir
  1138.                 dir *.c
  1139.                 dir -w a:\data\*.bak
  1140.                 dir -aw c:
  1141.  
  1142. See also: ls,cd,drive,pwd
  1143. ]
  1144. [
  1145. DISKFREE
  1146. System 2 operating environment   User's Guide - Internal Commands  diskfree
  1147. ---------------------------------------------------------------------------
  1148.  
  1149. Command          diskfree
  1150. Syntax           diskfree [<drive letter>]
  1151.  
  1152. This command will show the amount of free space left on the specified
  1153. drive, or the current drive if none is specified. The message returned
  1154. is of the form:
  1155.  
  1156.                  n bytes free out of m
  1157.  
  1158. where n is the disk space free, and m is the total storage capability of
  1159. the disk.
  1160.  
  1161. Notes:
  1162.  
  1163. The amount of space used is displayed with the dir or ls commands.
  1164.  
  1165. See also: dir, ls
  1166. ]
  1167. [
  1168. DRIVE
  1169. System 2 operating environment   User's Guide - Internal Commands     drive
  1170. ---------------------------------------------------------------------------
  1171.  
  1172. Command          drive
  1173. Syntax           drive <drive letter>
  1174.  
  1175. The drive command sets the default disk drive that is used by all commands.
  1176. <drive letter> must be in the range A-P, and the drive must exist. Drive A
  1177. corresponds to the first disk drive, and drive B to the second if you have
  1178. one fitted.
  1179.  
  1180. Examples:
  1181.                  drive a
  1182.                  drive d
  1183.  
  1184. See also: cd
  1185. ]
  1186. [
  1187. ECHO
  1188. System 2 operating environment   User's Guide - Internal Commands      echo
  1189. ---------------------------------------------------------------------------
  1190.  
  1191. Command          echo
  1192. Syntax           echo [<string1> <string2> ...]
  1193.  
  1194. This command outputs it's parameters to the standard output. No carriage
  1195. return is issued after the text is written. To issue a carriage return, use
  1196. echo without any parameters.
  1197.  
  1198. It is advisable to put direct text within quotes, otherwise it will be
  1199. converted to upper case, and will be subject to macro substitution.
  1200.  
  1201. Example session:
  1202.  
  1203. $ echo Hello
  1204. HELLO$ echo "Hello World"
  1205. Hello World$ echo "Hello World"; echo
  1206. Hello World
  1207. $ set %fred="Hello World"
  1208. $ echo %fred
  1209. Hello World$ echo Hello There World
  1210. HELLOTHEREWORLD$
  1211. ]
  1212. [
  1213. ELSE
  1214. System 2 operating environment   User's Guide - Internal Commands      else
  1215. ---------------------------------------------------------------------------
  1216.  
  1217. Command          else
  1218. Syntax           else
  1219.  
  1220. The else command is intended for use with the if statement. It will execute
  1221. all commands up to the corresponding endif statement, if the result of
  1222. the last if operation was false (ie non zero). For further details, see
  1223. the if command.
  1224.  
  1225. Example:
  1226.                  else
  1227.  
  1228. See also: if, endif
  1229. ]
  1230. [
  1231. ENDIF
  1232. System 2 operating environment   User's Guide - Internal Commands     endif
  1233. ---------------------------------------------------------------------------
  1234.  
  1235. Command          endif
  1236. Syntax           endif
  1237.  
  1238. The endif command signifies the end of a conditional block of code
  1239. controlled by an if statement. For further details, see the if command.
  1240.  
  1241. Example:
  1242.                  endif
  1243.  
  1244. See also: if, else
  1245. ]
  1246. [
  1247. EQUAL
  1248. System 2 operating environment   User's Guide - Internal Commands     equal
  1249. ---------------------------------------------------------------------------
  1250.  
  1251. Command          equal
  1252. Syntax           equal <string1> <string2>
  1253.  
  1254.  
  1255. The equal command returns a value of true (0) if <string2> is the same as
  1256. <string1>, or false (-1) if it isn't. It is intended for use with the if
  1257. command, for example,
  1258.  
  1259.        if equal %birdname "puffin" ; echo "Seabird" ; echo ; endif
  1260.  
  1261. would print 'Seabird' on the screen if the variable %birdname was equal to
  1262. the string 'puffin'. All tests are case sensitive.
  1263.  
  1264. Examples:
  1265.  
  1266.   equal "fred" "fred"                             returns 0
  1267.   equal "Fred" "fred"                             returns -1
  1268.   equal "fred" fred                               returns -1
  1269.   equal "fred" "james"                            returns 0
  1270.   equal fred fred                                 returns 0
  1271.  
  1272. Notes:
  1273.  
  1274. All tests are case sensitive, so "FRED" will not match 'Fred','fred', etc.
  1275.  
  1276. See also: notequal, contains, istrue
  1277. ]
  1278. [
  1279. EVAL
  1280. System 2 operating environment   User's Guide - Internal Commands      eval
  1281. ---------------------------------------------------------------------------
  1282.  
  1283. Command          eval
  1284. Syntax           eval <expression> [<expression> ...]
  1285.  
  1286. The eval command will evaluate a number of supplied expressions, and will
  1287. print the results out on the standard output. An expression can consist
  1288. of any one of the following:
  1289.  
  1290. (i) A numeric value, which is a number or a variable that gives a number.
  1291.     Examples: 5, 300000, 12345678, %age, %value
  1292.  
  1293. (ii) A number of numeric values separated by operators
  1294.      Examples: 5*8, 3+2*5, %age*2+71, %age/2=%value*50
  1295.  
  1296. Valid operators are (in order of precedence):
  1297.  
  1298. * (multiply)    / (divide)      + (add)         - (subtract)
  1299. = (equal)       { (less than)   } (greater than)
  1300.  
  1301. If a non-numeric & non-variable string is found, it will yield a value of
  1302. zero.
  1303.  
  1304. Examples:
  1305.                  eval 3*8+%age %age}17 3*3=9
  1306.  
  1307. - which, supposing age=15, results in 39 0 1 being displayed on the screen.
  1308.  
  1309. Notes:
  1310.  
  1311. All arithmetic is integer, ie no decimal points are allowed. The =
  1312. operator yields 1 if the expressions to either side are equal, or 0 if
  1313. they are not. Similarly { and } yield 1 if the left expression is less
  1314. or greater than the right expression respectively, otherwise 0. These
  1315. symbols were chosen instead of the more common < and > in order to avoid
  1316. possible confusion with the redirection symbols < and >.
  1317.  
  1318. See also: istrue, echo
  1319. ]
  1320. [
  1321. EXISTS
  1322. System 2 operating environment   User's Guide - Internal Commands    exists
  1323. ---------------------------------------------------------------------------
  1324.  
  1325. Command          exists
  1326. Syntax           exists <filespec>
  1327.  
  1328. This command returns true (0) if a file exists that matches the given
  1329. file specification, otherwise it returns false (-1).
  1330.  
  1331. Examples:
  1332.                  exists fred.doc
  1333.                  exists *.c
  1334.                  exists *.*
  1335.  
  1336. Notes:
  1337.  
  1338. The primary use of exists is in conjunction with the if statement in xsl
  1339. program. For example, the xsl segment
  1340.  
  1341.                  if exists "database.def"
  1342.                    * do nothing
  1343.                  else
  1344.                    echo "You need to create a database.def file!"
  1345.                    echo
  1346.                    exit -1
  1347.                  endif
  1348.  
  1349. would exit with a suitable error message if the file database.def does
  1350. not exist.
  1351.  
  1352. See also: if, xsl, $
  1353. ]
  1354. [
  1355. EXIT
  1356. System 2 operating environment   User's Guide - Internal Commands      exit
  1357. ---------------------------------------------------------------------------
  1358.  
  1359. Command          exit
  1360. Syntax           exit [<value>]
  1361.  
  1362. The exit command will stop execution of an xsl procedure, and return the
  1363. user to the System2 prompt. If a value is specified, this will be returned
  1364. to System2 as the return value of the xsl command, zero being returned by
  1365. default.
  1366.  
  1367. Examples:
  1368.                  exit
  1369.                  exit -1
  1370.  
  1371. See also: xsl, quit
  1372. ]
  1373. [
  1374. FALSE
  1375. System 2 operating environment   User's Guide - Internal Commands     false
  1376. ---------------------------------------------------------------------------
  1377.  
  1378. Command          false
  1379. Syntax           false
  1380.  
  1381. This command returns the value false (-1).
  1382.  
  1383. See also: true
  1384. ]
  1385. [
  1386. GETC
  1387. System 2 operating environment   User's Guide - Internal Commands      getc
  1388. ---------------------------------------------------------------------------
  1389.  
  1390. Command          getc
  1391. Syntax           getc
  1392.  
  1393. The getc command allows a single character to be input from the standard
  1394. input (the keyboard in most circumstances). It returns a value between
  1395. 0 and 255 corresponding to the ASCII value of the character that was
  1396. typed. If the input is from the keyboard (CON:, the default), then the
  1397. character is echoed on the screen.
  1398.  
  1399. Example:
  1400.                  getc
  1401.  
  1402. See also: putc, input
  1403. ]
  1404. [
  1405. GOTO
  1406. System 2 operating environment   User's Guide - Internal Commands      goto
  1407. ---------------------------------------------------------------------------
  1408.  
  1409. Command          goto
  1410. Syntax           goto label
  1411.  
  1412. The goto command is for use in xsl procedures, and causes a branch to
  1413. a part of the program that is labelled with the given label. A label
  1414. consists of a line in the program that contains a decimal point followed
  1415. by a space and the label name. See the decr command for a demonstration
  1416. of goto.
  1417.  
  1418. Example:
  1419.                  goto loop
  1420.  
  1421. See also: xsl,. ,decr
  1422. ]
  1423. [
  1424. IF
  1425. System 2 operating environment   User's Guide - Internal Commands        if
  1426. ---------------------------------------------------------------------------
  1427.  
  1428. Command          if
  1429. Syntax           if <command-line>
  1430.  
  1431. The if command allows commands to be executed only in certain
  1432. circumstances. The if command is followed by any System2 command line, and
  1433. it executes all commands up to the corresponding else or endif statement
  1434. only if this command line returns a value of true (0). This makes it
  1435. especially useful with the contains, equal, exists, false, istrue, and
  1436. true commands. Any commands between an else and an endif command are
  1437. executed only if the command line returns false (non zero). After the
  1438. endif, all processing carries on as normal. The if command is usually used
  1439. in two ways, either directly typed into System2, as in
  1440.  
  1441.     if istrue %age}17 ; echo "you can vote" ; echo ; endif
  1442.  
  1443. which displays "you can vote" if %age is greater than 17 (note the use of
  1444. the semicolon to separate the commands), or in an xsl program, such as the
  1445. segment below:
  1446.  
  1447.                  if istrue %age}17
  1448.                    echo "you can vote"
  1449.                    echo
  1450.                  else
  1451.                    echo "you can't vote"
  1452.                    echo
  1453.                  endif
  1454.  
  1455. Notes:
  1456.  
  1457. Nested ifs are allowed, provided they are all finished off with a
  1458. corresponding endif.
  1459.  
  1460. See also: else, endif, contains, equal, exists, false, istrue, true, xsl
  1461. ]
  1462. [
  1463. INCR
  1464. System 2 operating environment   User's Guide - Internal Commands      incr
  1465. ---------------------------------------------------------------------------
  1466.  
  1467. Command          incr
  1468. Syntax           incr <variable>
  1469.  
  1470. The incr command will add 1 to the value held in a variable.
  1471.  
  1472. Examples:
  1473.                  incr %count
  1474.                  incr %value
  1475.  
  1476. incr is very useful if used in a loop in an xsl program. For example, the
  1477. xsl program:
  1478.  
  1479.                  set %count=0
  1480.                  . loop
  1481.                  echo "Hello"
  1482.                  echo
  1483.                  incr %count
  1484.                  if istrue %count{10 ; goto loop ; endif
  1485.                  exit
  1486.  
  1487. will display "Hello" 10 times
  1488.  
  1489. Notes:
  1490.  
  1491. All arithmetic is in two byte integer form; incrementing over 32767 will
  1492. cause spurious results.
  1493. This command is equivalent to a two byte form of
  1494.                  set <variable>=<variable>+1
  1495.  
  1496. See also: decr, set, xsl
  1497. ]
  1498. [
  1499. INPUT
  1500. System 2 operating environment   User's Guide - Internal Commands     input
  1501. ---------------------------------------------------------------------------
  1502.  
  1503. Command          input
  1504. Syntax           input <variable> [<prompt>]
  1505.  
  1506. The input command allows a line of text to be input from the keyboard, and
  1507. this text is assigned to the specified variable, as if the set command
  1508. had been used. If the prompt parameter is supplied, then this prompt is
  1509. displayed on standard output before the user is allowed to input. If no
  1510. prompt is supplied, then a dash ('-') is output as a prompt.
  1511.  
  1512. Examples:
  1513.                  input %name
  1514.                  input %name "Please enter your name>"
  1515.  
  1516. Notes:
  1517.  
  1518. If you do not wish a prompt to be output, then use input <variable> ""
  1519.  
  1520. See also: getc
  1521. ]
  1522. [
  1523. ISTRUE
  1524. System 2 operating environment   User's Guide - Internal Commands    istrue
  1525. ---------------------------------------------------------------------------
  1526.  
  1527. Command          istrue
  1528. Syntax           istrue <expression>
  1529.  
  1530. This command yields a value of true (0) if the given expression is true,
  1531. else it returns a value of false. For a description of an expression, see
  1532. the eval command. The istrue command is very useful if used in conjunction
  1533. with the if command, as shown in the example below:
  1534.  
  1535.   if istrue %size}1000 ; echo "Size too large" ; endif
  1536.  
  1537. Examples:
  1538.                  istrue %fred+2=%bill-1
  1539.                  istrue %fred
  1540.  
  1541. See also: eval, equal, notequal
  1542. ]
  1543. [
  1544. LOCATE
  1545. System 2 operating environment   User's Guide - Internal Commands    locate
  1546. ---------------------------------------------------------------------------
  1547.  
  1548. Command          locate
  1549. Syntax           locate x y
  1550.  
  1551. The locate command will allow the cursor to be positioned on the screen.
  1552. The given x and y coordinates begin at 0, and are relative to the top left
  1553. of the screen. Usually, x should be from 0 to 79 and y from 0 to 24.
  1554.  
  1555. See also: clear
  1556. ]
  1557. [
  1558. LS
  1559. System 2 operating environment   User's Guide - Internal Commands        ls
  1560. ---------------------------------------------------------------------------
  1561.  
  1562. Command          ls
  1563. Syntax           ls [-[la]][<filespec>]
  1564.  
  1565. This command displays a list of all the files that are stored on a disk.
  1566.  
  1567. Unless the -l (long) qualifier is specified, only the names of the files or
  1568. directories that match the filespec are output, and no distinction is made
  1569. between subdirectories and files. If the -l qualifier is given, then the
  1570. output is of the form:
  1571.  
  1572.         <file status> <file size> <date & time of creation> <name>
  1573.  
  1574. The file status is given as three characters. An r indicates that the file
  1575. can be read (always the case), a w indicates that the file can be written
  1576. to (not read only), and a d indicates a subdirectory.
  1577.  
  1578. If the -a qualifier is specified, then all files that match the filespec
  1579. are shown, including system files that are normally hidden from the directory
  1580. list.
  1581.  
  1582. After the file list, the number of files matching the specification is shown
  1583. together with the number of bytes consumed by these files.
  1584.  
  1585. The optional filespec parameter can be (i) a filename with wildcards,
  1586. (ii) a disk drive letter followed by a colon, or (iii) a combination of
  1587. disk drive letter and filename.
  1588.  
  1589. Examples:
  1590.                 ls
  1591.                 ls *.c
  1592.                 ls -l a:\data\*.bak
  1593.                 ls -al c:
  1594.  
  1595. See also: dir, cd, drive, pwd
  1596. ]
  1597. [
  1598. MCAT
  1599. System 2 operating environment   User's Guide - Internal Commands      mcat
  1600. ---------------------------------------------------------------------------
  1601.  
  1602. Command          mcat
  1603. Syntax           mcat <macro> <string>
  1604.  
  1605. The mcat command will append a string to the end of a macro or variable,
  1606. and reassigns the resulting string to the macro or variable. An example
  1607. use of this in an xsl procedure is shown below:
  1608.  
  1609.                  * Input full name
  1610.                  input %initials "Enter initials>"
  1611.                  input %surname "Enter surname>"
  1612.                  set %name=%initials
  1613.                  mcat %name %surname
  1614.                  exit
  1615.  
  1616. Examples:
  1617.                  mcat %fred "abc"
  1618.                  mcat %fred %bill
  1619.  
  1620. See also: set, unset, mkill
  1621. ]
  1622. [
  1623. MKDIR
  1624. System 2 operating environment   User's Guide - Internal Commands     mkdir
  1625. ---------------------------------------------------------------------------
  1626.  
  1627. Command          mkdir
  1628. Syntax           mkdir <subdirectory>
  1629.  
  1630. The mkdir command creates a new subdirectory on the disk with the given
  1631. name. By default, the directory is created within the current directory.
  1632. This is similar to choosing 'Create New Folder' under the GEM desktop.
  1633.  
  1634. Examples
  1635.                  mkdir user
  1636.                  mkdir b:\database\files.dat
  1637.  
  1638. See also: cd, rmdir
  1639. ]
  1640. [
  1641. MKILL
  1642. System 2 operating environment   User's Guide - Internal Commands     mkill
  1643. ---------------------------------------------------------------------------
  1644.  
  1645. Command          mkill
  1646. Syntax           mkill
  1647.  
  1648. The mkill command will remove all macros and variables. It is equivalent
  1649. to using unset on each individual macro or variable
  1650.  
  1651. Example:
  1652.                  mkill
  1653.  
  1654. See also: unset, set, mcat
  1655. ]
  1656. [
  1657. MV
  1658. System 2 operating environment   User's Guide - Internal Commands        mv
  1659. ---------------------------------------------------------------------------
  1660.  
  1661. Command          mv
  1662. Syntax           mv <oldfilename> <newfilename>
  1663.  
  1664. The mv command (standing for move) allows files to be renamed. The
  1665. specified file <oldfilename> is given the name <newfilename>. The contents
  1666. of the file remain unchanged. No wildcards are allowed.
  1667.  
  1668. Examples:
  1669.                  mv fred.wp fred.doc
  1670.                  mv thing.tmp prog.c
  1671.  
  1672. Notes:
  1673.  
  1674. Files cannot be renamed across physical devices (ie disk drives), so the
  1675. command mv a:fred.doc b:fred.doc would not be valid. This command is
  1676. exactly equivalent to ren.
  1677.  
  1678. See also: ren, cp 
  1679. ]
  1680. [
  1681. NOTEQUAL
  1682. System 2 operating environment   User's Guide - Internal Commands  notequal
  1683. ---------------------------------------------------------------------------
  1684.  
  1685. Command          notequal
  1686. Syntax           notequal <string1> <string2>
  1687.  
  1688.  
  1689. The notequal command returns a value of false (-1) if <string2> is the same
  1690. as <string1>, or true (0) if it isn't. It is intended for use with the if
  1691. command, for example,
  1692.  
  1693.        if notequal %birdname "puffin" ; echo "Not puffin" ; echo ; endif
  1694.  
  1695. would print 'Not puffin' on the screen if the variable %birdname was not
  1696. equal to the string 'puffin'. All tests are case sensitive.
  1697.  
  1698. Examples:
  1699.  
  1700.   notequal "fred" "fred"                             returns -1
  1701.   notequal "Fred" "fred"                             returns 0
  1702.   notequal "fred" fred                               returns 0
  1703.   notequal "fred" "james"                            returns -1
  1704.   notequal fred fred                                 returns -1
  1705.  
  1706. Notes:
  1707.  
  1708. All tests are case sensitive, so "FRED" will not match 'Fred','fred', etc.
  1709.  
  1710. See also: equal, contains, istrue
  1711. ]
  1712. [
  1713. PATH
  1714. System 2 operating environment   User's Guide - Internal Commands      path
  1715. ---------------------------------------------------------------------------
  1716.  
  1717. Command          path
  1718. Syntax           path [<pathname>]
  1719.  
  1720. The path command changes the default directory for executable programs (such
  1721. as bombs) to the given pathname. For example, if you had a utility fred.ttp
  1722. in subdirectory \bin, then after typing
  1723.  
  1724.                  path \bin
  1725.  
  1726. you could just type
  1727.  
  1728.                  fred
  1729.  
  1730. to execute the program, instead of
  1731.  
  1732.                  \bin\fred
  1733.  
  1734. Note that if any colons(:) or backslashes (\) appear in the program name when
  1735. typed in to be executed, the default pathname will be overridden
  1736.  
  1737. See also: pwd
  1738. ]
  1739. [
  1740. PR
  1741. System 2 operating environment   User's Guide - Internal Commands        pr
  1742. ---------------------------------------------------------------------------
  1743.  
  1744. Command          pr
  1745. Syntax           pr [-[l<x>s<x>i<x>t] [<title>]] [<filespec>]
  1746.  
  1747. pr is a flexible command that allows a text file to be formatted. The
  1748. output is of a form particularly suitable for printing. The filespec
  1749. consists of a filename which can contain wildcards. There are four
  1750. qualifiers which can be specified, details of which are given below.
  1751. The output is by default to standard output.
  1752.  
  1753.     l       The number following this qualifier specifies the length
  1754.             of a page of output, which is used by the s qualifier. The
  1755.             default is 66. The length is given in printed lines.
  1756.     s       The number following the s qualifier specifies the number
  1757.             of lines that are to be left blank at the end of each page
  1758.             (for instance to skip over a page break). The default is 0.
  1759.     i       The number following the i qualifier specifies the number
  1760.             of spaces that are to be output before each line of text,
  1761.             ie the left margin indent. The default is 0.
  1762.     t       Specifies that a title & page numbers are to be printed.
  1763.             If this qualifier is given, then the <title> parameter
  1764.             must be specified, which is the title.
  1765.  
  1766. Examples:
  1767.  
  1768.    pr fred.dat                              The same as cat fred.dat
  1769.    pr -i5 fred.dat                          Show fred.dat with a left
  1770.                                             margin of 5 spaces.
  1771.    pr -l70s10i15 fred.dat                   Show fred.dat with a left
  1772.                                             margin of 15 spaces, and
  1773.                                             use a page length of 70
  1774.                                             lines, missing the last 10
  1775.                                             lines on each page.
  1776.    pr -l60s5t "Data file" fred.dat          Show fred.dat on the screen
  1777.                                             and use a page length of 60
  1778.                                             lines, skipping 5 lines at
  1779.                                             the end of each page, and
  1780.                                             putting the title "Data file"
  1781.                                             & the page number at the top
  1782.                                             of each page.
  1783.    pr -l60s5t "Data file" fred.dat > prn:   As above, but send to the
  1784.                                             printer
  1785.    help index | pr -l70s10                  Pipes output of help into
  1786.                                             pr for formatting.
  1787.  
  1788. Notes:
  1789.  
  1790. pr cannot accept input from the keyboard like cat, since it is line
  1791. orientated.
  1792.  
  1793. See also: cat, type
  1794. ]
  1795. [
  1796. PUTC
  1797. System 2 operating environment   User's Guide - Internal Commands      putc
  1798. ---------------------------------------------------------------------------
  1799.  
  1800. Command          putc
  1801. Syntax           putc <n> [<n> <n> ...]
  1802.  
  1803. The putc command translates the given number(s), which should be in the range
  1804. 0-255, into their ASCII character equivalents, which are then sent to the
  1805. standard output. For example,
  1806.  
  1807.                  putc 72 69 76 76 79
  1808.  
  1809. displays HELLO on the screen, since ASCII 72='H', ASCII 69='E', etc.
  1810.  
  1811. One major application of putc is in the writing of control codes. For example,
  1812. in order to be put into emphasised text mode, most Epson compatible printers
  1813. need to be sent a sequence of control codes as ASCII characters, namely
  1814. character 27 followed by character 69 (ESC E). So, to put your printer into
  1815. emphasised mode, you could type
  1816.  
  1817.                  putc 27 69 > prn:
  1818.  
  1819. See also: getc, echo, cat, pr
  1820. ]
  1821. [
  1822. PWD
  1823. System 2 operating environment   User's Guide - Internal Commands       pwd
  1824. ---------------------------------------------------------------------------
  1825.  
  1826. Command          pwd
  1827. Syntax           pwd
  1828.  
  1829. The pwd command displays the letter of the current disk drive, and the
  1830. current subdirectory that you are in. It basically reminds you which
  1831. subdirectory you are in, if any.
  1832.  
  1833. Example session:
  1834.  
  1835. $ pwd
  1836. Current directory path is A:\
  1837. $ drive b
  1838. $ pwd
  1839. Current directory path is B:\
  1840. $ cd bin
  1841. $ pwd
  1842. Current directory path is B:\BIN\
  1843.  
  1844. Notes:
  1845.  
  1846. pwd is a 'Unixism', and stands for print working directory.
  1847.  
  1848. See also: cd, drive
  1849. ]
  1850. [
  1851. QUIT
  1852. System 2 operating environment   User's Guide - Internal Commands      quit
  1853. ---------------------------------------------------------------------------
  1854.  
  1855. Command          quit
  1856. Syntax           quit
  1857.  
  1858. The quit command will restore the colours to their values before System2
  1859. was started, and will return to the desktop or calling program
  1860.  
  1861. Example:
  1862.                  quit
  1863. ]
  1864. [
  1865. REN
  1866. System 2 operating environment   User's Guide - Internal Commands       ren
  1867. ---------------------------------------------------------------------------
  1868.  
  1869. Command          ren
  1870. Syntax           ren <oldfilename> <newfilename>
  1871.  
  1872. The ren command allows files to be renamed. The specified file
  1873. <oldfilename> is given the name <newfilename>. The contents of the file
  1874. remain unchanged. No wildcards are allowed.
  1875.  
  1876. Examples:
  1877.                  ren fred.wp fred.doc
  1878.                  ren thing.tmp prog.c
  1879.  
  1880. Notes:
  1881.  
  1882. Files cannot be renamed across physical devices (ie disk drives), so the
  1883. command ren a:fred.doc b:fred.doc would not be valid. This command is
  1884. exactly equivalent to mv.
  1885.  
  1886. See also: mv, cp 
  1887. ]
  1888. [
  1889. RESULT
  1890. System 2 operating environment   User's Guide - Internal Commands    result
  1891. ---------------------------------------------------------------------------
  1892.  
  1893. Command          result
  1894. Syntax           result
  1895.  
  1896. The result command displays on the standard output the value returned by
  1897. the last command executed.System2 commands usually return 0 or more
  1898. to mean successful completion, -1 to mean error, and -2 to mean that a
  1899. syntax message was output.
  1900.  
  1901. Example:
  1902.                  result
  1903.  
  1904. Notes:
  1905.  
  1906. This command is equivalent to typing echo %result.
  1907. ]
  1908. [
  1909. RM
  1910. System 2 operating environment   User's Guide - Internal Commands        rm
  1911. ---------------------------------------------------------------------------
  1912.  
  1913. Command          rm
  1914. Syntax           rm <filespec>
  1915.  
  1916. This command is used to remove disk files that are no longer needed. A
  1917. removed file CANNOT BE RECOVERED.
  1918.  
  1919. The filespec parameter can be a single filename, in which case the given
  1920. file is deleted, or a wildcard, in which case all files that match the
  1921. specification are deleted.
  1922.  
  1923. Obviously, this command must be used with great care. If you wish, the
  1924. command DEL can be used in place of RM.
  1925.  
  1926. Examples:
  1927.                  rm fred.doc
  1928.                  rm *.c
  1929.  
  1930. See also: del, rmdir
  1931. ]
  1932. [
  1933. RMDIR
  1934. System 2 operating environment   User's Guide - Internal Commands     rmdir
  1935. ---------------------------------------------------------------------------
  1936.  
  1937. Command          rmdir
  1938. Syntax           rmdir <subdirectory>
  1939.  
  1940. The rmdir command removes an empty subdirectory from the disk. To delete a
  1941. subdirectory with files in it, the files within the subdirectory must first
  1942. be removed (using the rm command) before the rmdir command is issued.
  1943.  
  1944. Examples:
  1945.  
  1946.                  rmdir documents
  1947.                  rmdir source\c_code
  1948.  
  1949. See also: cd, mkdir, rm
  1950. ]
  1951. [
  1952. SET
  1953. System 2 operating environment   User's Guide - Internal Commands       set 
  1954. ---------------------------------------------------------------------------
  1955.  
  1956. Command          set
  1957. Syntax           set [<macro>[ = | : ][<value]]
  1958.  
  1959. The set command controls the assigning of variables and macros, and is a
  1960. fairly complex command.
  1961. If issued without any parameters, set will respond with a list of the
  1962. current values of all system variables, followed by a list of all macros
  1963. and user defined variables if any exist.
  1964.  
  1965. Set allows values to be assigned to either system variables, macros or
  1966. user defined variables. The single parameter consists of a variable name,
  1967. followed by an = or a : , then the value that the variable is to take.
  1968. If the separator is an = sign, then an attempt will be made to evaluate
  1969. the value to a numeric expression (see eval), so, for example, 3*6 would
  1970. yield a value of 18. However, if the separator is a colon (:), the
  1971. value will be interpreted as a direct string, so 3*6 would yield a value
  1972. of "3*6". If a value is being assigned to a system variable, then the
  1973. separator type is arbitrary: the value is interpreted according to the
  1974. sort of value the system variable holds.
  1975.  
  1976. If no value is given, then the specified macro or variable is de-assigned,
  1977. as with the unset command.
  1978.  
  1979. Examples:
  1980.  
  1981.   set                                   Produces a list of variables
  1982.   set edit:"a:\bin\me"                  Make macro edit equal to the string
  1983.                                         "a:\bin\me"
  1984.   set %fred=%age+20                     Makes variable %fred with a value
  1985.                                         20 more than the value of %age
  1986.   set %fred:"%age+20"                   Makes variable %fred equivalent to
  1987.                                         the string "%age+20"
  1988.   set %fred=                            De-assign variable %fred
  1989.  
  1990. Notes:
  1991.  
  1992. There must be no spaces around the = or : sign. 
  1993.  
  1994. See also: unset, mcat, mkill,incr, decr, eval
  1995. ]
  1996. [
  1997. TIME
  1998. System 2 operating environment   User's Guide - Internal Commands      time
  1999. ---------------------------------------------------------------------------
  2000.  
  2001. Command          time
  2002. Syntax           time [<hh> <mm> <ss>]
  2003.  
  2004. The time command will display the current time, or will allow the time to
  2005. be set if the three parameters (corresponding to hours, minutes, seconds)
  2006. are supplied. The hours are given in 24 hour format (0-23)
  2007.  
  2008.  
  2009. Examples:
  2010.                  time
  2011.                  time 7 41 30
  2012.                  time 23 31 28
  2013.  
  2014. See also: date
  2015. ]
  2016. [
  2017. TRUE
  2018. System 2 operating environment   User's Guide - Internal Commands      true
  2019. ---------------------------------------------------------------------------
  2020.  
  2021. Command          true
  2022. Syntax           true
  2023.  
  2024. This command returns the value true (0).
  2025.  
  2026. See also: false
  2027. ]
  2028. [
  2029. TYPE
  2030. System 2 operating environment   User's Guide - Internal Commands      type
  2031. ---------------------------------------------------------------------------
  2032.  
  2033. Command          type
  2034. Syntax           type <filename1> [<filename2> ... ]
  2035.  
  2036. The type command displays the contents of each disk file specified. The
  2037. filenames cannot contain any wildcards.
  2038.  
  2039. Examples:
  2040.                  type customer.rec
  2041.                  type test1.c test2.c test3.c
  2042.                  type test4.c > prn:
  2043.  
  2044.  
  2045. Notes:
  2046.  
  2047. Pressing CONTROL S and CONTROL Q during displaying a file on the screen will
  2048. cause the screen to freeze and be released, enabling text to be viewed
  2049. before it scrolls off the screen. Do not press CONTROL C during output, or
  2050. else you may be aborted to the desktop.
  2051.  
  2052. See also: cat, pr
  2053. ]
  2054. [
  2055. UNSET
  2056. System 2 operating environment   User's Guide - Internal Commands     unset
  2057. ---------------------------------------------------------------------------
  2058.  
  2059. Command          unset
  2060. Syntax           unset <macro>
  2061.  
  2062. The unset command allows a macro or variable to be disposed of. The contents
  2063. and store are lost.
  2064.  
  2065. Examples:
  2066.                  unset %fred
  2067.                  unset edit
  2068.  
  2069. Notes:
  2070.  
  2071. System variables cannot be unset
  2072.  
  2073. See also: mkill, set
  2074. ]
  2075. [
  2076. XSL
  2077. System 2 operating environment   User's Guide - Internal Commands       xsl
  2078. ---------------------------------------------------------------------------
  2079.  
  2080. Command          xsl
  2081. Syntax           xsl <filename> [<param1> ... <param9>]
  2082.  
  2083. The xsl command will execute an xsl program with the given filename. The
  2084. file must have the extension .XSL. The optional parameters are passed
  2085. to the program as variables %1 to %9. There can be between 0 and 9
  2086. parameters, the number of which is stored in a temporary variable %argc.
  2087.  
  2088. Examples:
  2089.  
  2090.                  xsl dobackup
  2091.                  xsl deldir cprogs.c
  2092.                  xsl newecho "ABC" 123 ABC123 %fred
  2093.  
  2094. Notes:
  2095.  
  2096. This command is exactly equivalent to $. This command cannot be used
  2097. within an XSL program.
  2098.  
  2099.  
  2100. See also: $
  2101. ]
  2102. [
  2103. .
  2104. System 2 operating environment   User's Guide - Internal Commands         .
  2105. ---------------------------------------------------------------------------
  2106.  
  2107. Command          .
  2108. Syntax           . <label>
  2109.  
  2110. The . command is followed by a label which is used by the goto command
  2111. in xsl programs. See goto for more details.
  2112.  
  2113. Examples:
  2114.                  . loop
  2115.                  . do_exit
  2116.  
  2117. See also: goto, xsl
  2118. ]
  2119. [
  2120. $
  2121. System 2 operating environment   User's Guide - Internal Commands         $
  2122. ---------------------------------------------------------------------------
  2123.  
  2124. Command          $
  2125. Syntax           $ <filename> [<param1> ... <param9>]
  2126.  
  2127. The $ command will execute an xsl program with the given filename. The
  2128. file must have the extension .XSL. The optional parameters are passed
  2129. to the program as variables %1 to %9. There can be between 0 and 9
  2130. parameters, the number of which is stored in a temporary variable %argc.
  2131.  
  2132. Examples:
  2133.  
  2134.                  $ dobackup
  2135.                  $ deldir cprogs.c
  2136.                  $ newecho "ABC" 123 ABC123 %fred
  2137.  
  2138. Notes:
  2139.  
  2140. This command is exactly equivalent to xsl.
  2141.  
  2142. See also: xsl
  2143. ]
  2144. [
  2145. *
  2146. System 2 operating environment   User's Guide - Internal Commands         *
  2147. ---------------------------------------------------------------------------
  2148.  
  2149. Command          *
  2150. Syntax           * <string>
  2151.  
  2152. The * command completely ignores any parameters that follow it. It is
  2153. meant for placing comments in xsl programs, like the good old BASIC
  2154. REM statement.
  2155.  
  2156. Examples:
  2157.                  * This is a load of rubbish
  2158.                  * Interesting comments
  2159.  
  2160. See also: xsl
  2161. ]
  2162. [
  2163. HELP
  2164. System 2 operating environment   User's Guide - External Commands      help
  2165. ---------------------------------------------------------------------------
  2166.  
  2167. Command          HELP
  2168. Syntax           HELP <topic>|FULL
  2169.  
  2170. Displays help information on the specified topic, or shows the full manual
  2171. if FULL is specified. A topic of ? gives a title page, and INDEX shows
  2172. an index to the manual. The file MANUAL. must be in the root directory
  2173. of the current disk.
  2174. ]
  2175. [
  2176. BOMBS
  2177. System 2 operating environment   User's Guide - External Commands     bombs
  2178. ---------------------------------------------------------------------------
  2179.  
  2180. Command          BOMBS
  2181. Syntax           BOMBS
  2182.  
  2183. This produces an exception analysis after a 68000 bomb out.
  2184. ]
  2185. [
  2186. TL50
  2187. System 2 operating environment   User's Guide - External Commands      tl50
  2188. ---------------------------------------------------------------------------
  2189.  
  2190. Command          TL50
  2191. Syntax           TL50
  2192.  
  2193. This changes the screen to 50 line mode. It is for MONO MONITOR use only,
  2194. and should be followed by a CLEAR command.
  2195.  
  2196. See also: tl25
  2197. ]
  2198. [
  2199. TL25
  2200. System 2 operating environment   User's Guide - External Commands      tl25
  2201. ---------------------------------------------------------------------------
  2202.  
  2203. Command          TL25
  2204. Syntax           TL25
  2205.  
  2206. The TL25 command restores the screen to a 50 line mode after a tl50
  2207. command. It should be followed by a CLEAR command.
  2208.  
  2209. See also: tl50
  2210. ]
  2211. [
  2212. GLOSSARY
  2213. System 2 operating environment   User's Guide - Internal Commands  glossary
  2214. ---------------------------------------------------------------------------
  2215.  
  2216.  
  2217.                                  GLOSSARY
  2218.                                  --------
  2219.  
  2220.  
  2221. Directory       Either the 'root directory' which is the default, top level
  2222.                 directory that contains all subdirectories, and is
  2223.                 referenced by the name '\', or a subdirectory
  2224.  
  2225. Filename        The name given to a file on the disk, displayed under it's
  2226.                 icon in GEM.
  2227.  
  2228. Filespec        A filename or pathname that can contain wildcards
  2229.  
  2230. Pathname        A filename that also specifies the drive &/or directory
  2231.                 where a file lies. The general format is
  2232.                   [<drive>:][<directory>\ ...]<file>
  2233.                 eg: a:\bin\me
  2234.                 or  \bin\fred
  2235.                 or  d:
  2236.                 or  a:\
  2237.                 or  \
  2238.                 Most filenames in System2 can be given as pathnames
  2239.  
  2240. Stdin,Stdout,
  2241. Stderr          See section on redirection
  2242.  
  2243. String          A string is a collection of characters, numbers, etc.
  2244.  
  2245. Subdirectory    Same as a folder under GEM. A subdirectory has the same
  2246.                 format as a pathname.
  2247.  
  2248. Wildcard        A special character - * or ? - used in a filespec, to
  2249.                 enable more than one file to be referenced by one
  2250.                 filespec. * stands for any number of any character, and
  2251.                 ? stands for one of any character. So *.* matches all
  2252.                 files, *.doc matches all files with extension doc, a*.*
  2253.                 matches all files starting with a, chapt?.doc matches
  2254.                 chapt1.doc, chapt2.doc, chaptx.doc, etc.
  2255.  
  2256.